﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Windows.Data;

namespace Phone.Framework.Converters
{
    public class ArrayToStringConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var array = value as string[];
            if (array == null)
                return null;
            return String.Join(", ", array);
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
